//
//  WebViewController.m
//  IntegralDog
//
//  Created by HanenDev on 16/3/17.
//  Copyright © 2016年 hanen. All rights reserved.
//

#import "WebViewController.h"
#import "Macro.h"

@interface WebViewController ()

@property(nonatomic,strong)UIWebView *webView;
@end

@implementation WebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor = [UIColor whiteColor];
    
    self.webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, 0, kScreenWidth, kScreenHeight)];
    self.webView.scalesPageToFit =YES;
    [self.view addSubview:self.webView];
    
    NSString *urlStr = _urlStr;
    if (![_urlStr hasPrefix:@"http://"]) {
        urlStr = [NSString stringWithFormat:@"http://%@", _urlStr];
    }
    
    NSURL *url = [NSURL URLWithString:urlStr];
    
    NSURLRequest *request = [NSURLRequest requestWithURL:url];
    
    [self.webView loadRequest:request];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
